package org.feiye.studyday17.computer;

public class Computer {
	private String brand;

	public Computer(String brand) {
		this.brand = brand;
	}

	private Cpu cpu;// cpu接口
	private Disk disk;// 硬盘接口
	private RAM ram;// 内存接口

	public void setCpu(Cpu c) {
		cpu = c;
	}

	public void setDisk(Disk d) {
		disk = d;
	}

	public void setRAM(RAM r) {
		ram = r;
	}

	@Override
	public String toString() {
		return "电脑的品牌是：" + brand + "\n" + cpu.showCpu() + "\n" + disk.showDisk() + "\n" + ram.showRam();
	}
}
